# 达到了类似单例的效果,属性相同,但并不是单例
class Borg(object):
    _state = {}

    def __new__(cls, *args, **kw):
        ob = super(Borg, cls).__new__(cls, *args, **kw)
        ob.__dict__ = cls._state
        return ob


a = Borg()
a.name = 'a'
b = Borg()
print(b.name)

print(a is b)
